package com.cnzhy.controller;

import com.cnzhy.service.UserFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhaoyan5
 */
@RestController
public class HelloMessageController {

    UserFeignService userFeignService;

    @Autowired
    public void setUserFeignService(UserFeignService userFeignService) {
        this.userFeignService = userFeignService;
    }

    /**
     * 测试 http://localhost:8500/show?name=zhaoyan
     */
    @GetMapping("/show")
    public String showMessage(@RequestParam String name) {
        return userFeignService.getMessage(name);
    }

}
